package zy.zy1;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class demo{
    public static void main(String[] args) {
        Integer[] arr = {80,98,87,65,32};
        System.out.println("排序前："+ Arrays.toString(arr));
        List<Integer> list = Arrays.asList(arr);
        list.sort(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2-o1;
            }
        });
        System.out.println("排序后："+ Arrays.toString(arr));
    }

    
}
